<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改角色</title>
    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">

    <link href="__PUBLIC__/Theme1/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改角色 <a href="__URL__/role" style="margin-left:15px; color:#06cbc4">角色列表</a></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form method="post" action="__URL__/RoleUpdateAction/arId/<{$rs_role.arId}>" class="form-horizontal" id="form-admin-add" >
                            <div class="form-group">
                                <label class="col-sm-2 control-label">角色名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="arName" name="arName" value="<{$rs_role.arName}>" >
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">备注</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="arInfo" name="arInfo" value="<{$rs_role.arInfo}>" >
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">网站角色</label>
                                 <php>
                                    $sys=A;
                                    $sys_1=A1;
                                    $sys_2=A2;
                                    $sys_3=A3;
                                    $dep=B;
                                    $powers=explode("-",$rs_role["arPowers"]);
                                    if($powers[0]==$sys){
                                    $checked_sys="checked";
                                    }else{
                                    $checked_sys="";
                                    }
                                    if($powers[1]==$sys_1){
                                    $checked_sys_1="checked";
                                    }else{
                                    $checked_sys_2="";
                                    }
                                    if($powers[2]==$sys_2){
                                    $checked_sys_2="checked";
                                    }else{
                                    $checked_sys_2="";
                                    }
                                    if($powers[3]==$sys_3){
                                    $checked_sys_3="checked";
                                    }else{
                                    $checked_sys_3="";
                                    }
                                    if($powers[4]==$dep){
                                    $checked_dep="checked";
                                    }else{
                                    $checked_dep="";
                                    }
                                    </php>
                                <div class="col-sm-10">
                                    <fieldset>

                                    <div class="checkbox checkbox-success checkbox-inline">
                                        <input type="checkbox" id="inlineCheckbox2" value="<{$sys}>" name="systems" <{$checked_sys}> >
                                        <label for="inlineCheckbox2"> 系统相关角色 </label>
                                    </div>
                                    <div style="margin-left: 25px;">
                                        
                                        <div class="checkbox checkbox-info">
                                            <input id="checkbox4" type="checkbox" value="<{$sys_1}>" name="adminGroup" <{$checked_sys_1}> >
                                            <label for="checkbox4">
                                                管理员管理
                                            </label>
                                        </div>
                                        <div class="checkbox checkbox-warning">
                                            <input id="checkbox5" type="checkbox" value="<{$sys_2}>" name="staffGroup" <{$checked_sys_2}> >
                                            <label for="checkbox5">
                                                会员管理
                                            </label>
                                        </div>
                                       
                                    </div>

									
                                    
                                </fieldset>
                                </div>
                           
                                
                               </div>

                                
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">修改角色</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/jquery.validate.min.js"></script> 

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/messages_zh.min.js"></script> 



<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/validate-methods.js"></script> 



   
    <script>
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    </script>
    
    <script type="text/javascript">
	$(function(){
	$("#form-admin-add").validate({
		rules:{
			arName:{
				required:true,
			},
           arInfo:{
                required:true,
            },
            
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			$(form).ajaxSubmit();
			var index = parent.layer.getFrameIndex(window.name);
			parent.$('.btn-refresh').click();
			parent.layer.close(index);
		}
	});
});
</script> 
    
    
</body>

</html>
